﻿@model GDoc.Web.Models.RegisterModel

@{
    ViewBag.Title = "Register";
}

<h2>Nueva cuenta de usuario</h2>
<p>
    Ingrese su email y contraseña. La contraseña debe tener un mínimo de @ViewBag.PasswordLength caracteres.
</p>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    
    @Html.ValidationSummary(true, "No se pudo crear la cuenta. Por favor, verifíque los datos y vuelta a intentarlo.")
    
    <div class="editor-label">
        @Html.LabelFor(m => m.Email)
    </div>
    <div class="editor-field">
        @Html.TextBoxFor(m => m.Email)
        @Html.ValidationMessageFor(m => m.Email)
    </div>

    <div class="editor-label">
        @Html.LabelFor(m => m.Password)
    </div>
    <div class="editor-field">
        @Html.PasswordFor(m => m.Password)
        @Html.ValidationMessageFor(m => m.Password)
    </div>

    <div class="editor-label">
        @Html.LabelFor(m => m.ConfirmPassword)
    </div>
    <div class="editor-field">
        @Html.PasswordFor(m => m.ConfirmPassword)
        @Html.ValidationMessageFor(m => m.ConfirmPassword)
    </div>

    <p>
        <input type="button" value="Cancelar" class="cancel-button" onclick="navigateToUrl('@Url.Action("Index", "Home")')" />
        <input type="submit" value="Registrarse" class="accept-button" />
    </p>
}
